;(function(root){
    function Index(len){
        this.len=len;
        this.index=0;
    }
    Index.prototype ={
        prev(){
            return this.get(-1);
        },
        next(){
            return this.get(1)
        },
        get(val=0){
            this.index =(this.index+val+this.len) % this.len;
            return this.index
        }
    }
    root.controlIndex=Index;
   
})(window.player || (window.player={}))